package com.casic.common.utils;

import org.springframework.beans.factory.annotation.Value;

/**
 * @author Li
 * @create 2019-04-17 11:34
 * @descriptions FTPClient 连接池配置类
 */
public class FTPPoolConfig {
    /**
     * 主机名
     */
    @Value("${ftp.address}")
    private String host;
    /**
     * 主机端口
     */
    @Value("${ftp.port}")
    private int port;
    /**
     * 用户名
     */
    @Value("${ftp.account}")
    private String username;
    /**
     * 密码
     */
    @Value("${ftp.password}")
    private String password;
    /**
     * 连接超时时间，毫秒
     */
    private int connectTimeout = 5000;
    /**
     * 编码
     */
    private String controlEncoding = "utf-8";
    /**
     * 缓冲区大小
     */
    private int bufferSize = 1024;
    /**
     * 传输数据格式，2表示2进制 binary
     */
    private int fileType = 2;
    /**
     * 从FTP读数据超时时间，毫秒
     */
    private int dataTimeout = 20000;
    /**
     *
     */
    private boolean useEPSVwithIPv4 = false;
    /**
     * 是否启用被动模式
     */
    private boolean passiveMode = true;

    public FTPPoolConfig() {
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public String getControlEncoding() {
        return controlEncoding;
    }

    public void setControlEncoding(String controlEncoding) {
        this.controlEncoding = controlEncoding;
    }

    public int getBufferSize() {
        return bufferSize;
    }

    public void setBufferSize(int bufferSize) {
        this.bufferSize = bufferSize;
    }

    public int getFileType() {
        return fileType;
    }

    public void setFileType(int fileType) {
        this.fileType = fileType;
    }

    public int getDataTimeout() {
        return dataTimeout;
    }

    public void setDataTimeout(int dataTimeout) {
        this.dataTimeout = dataTimeout;
    }

    public boolean isUseEPSVwithIPv4() {
        return useEPSVwithIPv4;
    }

    public void setUseEPSVwithIPv4(boolean useEPSVwithIPv4) {
        this.useEPSVwithIPv4 = useEPSVwithIPv4;
    }

    public boolean isPassiveMode() {
        return passiveMode;
    }

    public void setPassiveMode(boolean passiveMode) {
        this.passiveMode = passiveMode;
    }
}
